package com.skytech.tax.customsdatawarehouse.singlewindow.customsagententrusted.domain.entity;

import com.alibaba.fastjson.JSONObject;
import org.joda.time.DateTime;

/**
 * @author Lianhong
 * @since 2022/6/15
 */
public class EntrustedAgreement {

    private String seqNo;
    private String consignNo;           //委托协议编号
    private String agentCode;           //被委托方企业海关代码
    private String declDate;            //发起时间
    private String consignNoL;          //委托书编号
    private String entryId;             //报关单号
    private String entrustedAgreement;  //委托协议数据
    private String storageTime;         //入库时间
    private String socialCreditCode;    //企业组织机构代码

    public EntrustedAgreement(String socialCreditCode, JSONObject entrustedAgreement) {
        this.seqNo = entrustedAgreement.getString("seqNo");
        this.consignNo = entrustedAgreement.getString("consignNo");
        this.agentCode = entrustedAgreement.getString("agentCode");
        this.declDate = entrustedAgreement.getString("declDate");
        this.consignNoL = entrustedAgreement.getString("consignNoL");
        this.entryId = entrustedAgreement.getString("entryId");
        this.entrustedAgreement = entrustedAgreement.toJSONString();
        this.storageTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
        this.socialCreditCode = socialCreditCode;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getConsignNo() {
        return consignNo;
    }

    public void setConsignNo(String consignNo) {
        this.consignNo = consignNo;
    }

    public String getAgentCode() {
        return agentCode;
    }

    public void setAgentCode(String agentCode) {
        this.agentCode = agentCode;
    }

    public String getDeclDate() {
        return declDate;
    }

    public void setDeclDate(String declDate) {
        this.declDate = declDate;
    }

    public String getConsignNoL() {
        return consignNoL;
    }

    public void setConsignNoL(String consignNoL) {
        this.consignNoL = consignNoL;
    }

    public String getEntryId() {
        return entryId;
    }

    public void setEntryId(String entryId) {
        this.entryId = entryId;
    }

    public String getEntrustedAgreement() {
        return entrustedAgreement;
    }

    public void setEntrustedAgreement(String entrustedAgreement) {
        this.entrustedAgreement = entrustedAgreement;
    }

    public String getStorageTime() {
        return storageTime;
    }

    public void setStorageTime(String storageTime) {
        this.storageTime = storageTime;
    }

    public String getSocialCreditCode() {
        return socialCreditCode;
    }

    public void setSocialCreditCode(String socialCreditCode) {
        this.socialCreditCode = socialCreditCode;
    }
}
